#import "dfhgwhruebvhrheydisastrousvibrate.h"
@implementation dfhgwhruebvhrheydisastrousvibrate {
	UIButton *oneday;
	UIButton *twoday;
	void(^_selected)(NSString *pay1, NSString *pay2);
}
- (void)awakeFromNib {
	[super awakeFromNib];
	self.php_w = dhgfywegwygeydwdispositionvisualize;
}
- (void)selectPayDay:(void(^)(NSString *pay1, NSString *pay2))select {
	_selected = select;
}
- (IBAction)itemBtnClick:(UIButton *)sender {
	switch (sender.tag) {
		case 100: {
			if (_selected) {
				_selected(nil, nil);
			}
		}
			break;
		case 200: {
			if (oneday == nil || twoday == nil) {
				return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please select two pay dates"];
			}
			NSString *day1 = [oneday titleForState:UIControlStateNormal];
			NSString *day2 = [twoday titleForState:UIControlStateNormal];
			if ([day1 intValue] < [day2 intValue]) {
				if (_selected) {
					_selected(day1, day2);
				}
			}else {
				if (_selected) {
					_selected(day2, day1);
				}
			}
		}
			break;
		default: {
			if (oneday == nil) {
				if(sender == twoday) {
					twoday.backgroundColor = [UIColor whiteColor];
					[twoday setTitleColor:@"#3B414B".dhgfywegwygeydwlearneddesignate forState:UIControlStateNormal];
					twoday = nil;
				}else {
					oneday = sender;
					oneday.backgroundColor = @"#7658FC".dhgfywegwygeydwlearneddesignate;
					[oneday setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
				}
			}else {
				if (oneday == sender) {
					oneday.backgroundColor = [UIColor whiteColor];
					[oneday setTitleColor:@"#3B414B".dhgfywegwygeydwlearneddesignate forState:UIControlStateNormal];
					oneday = nil;
				}else {
					if (twoday == sender) {
						twoday.backgroundColor = [UIColor whiteColor];
						[twoday setTitleColor:@"#3B414B".dhgfywegwygeydwlearneddesignate forState:UIControlStateNormal];
						twoday = nil;
					}else {
						twoday.backgroundColor = [UIColor whiteColor];
						[twoday setTitleColor:@"#3B414B".dhgfywegwygeydwlearneddesignate forState:UIControlStateNormal];
						sender.backgroundColor = @"#7658FC".dhgfywegwygeydwlearneddesignate;
						[sender setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
						twoday = sender;
					}
				}
			}
		}
			break;
	}
}
@end
